<%@ page import="pojo.Student" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <title>update</title>
</head>
<body>
<h1></h1>
<br>
<br>
<br>
<br>
<form class="layui-form" method="post" action="/student/updateSave">

    <%--    隐藏域--%>
    <input type="hidden" name="sid" value="${student.sid}">


    <div class="layui-form-item">
        <label class="layui-form-label">学号</label>
        <div class="layui-input-inline layui-input-wrap">
            <input type="text" name="studentNum" lay-verify="required" autocomplete="off" lay-affix="clear"
                   class="layui-input" value="${student.studentNum}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline layui-input-wrap">
            <input type="text" name="studentName" lay-verify="required" autocomplete="off" lay-affix="clear"
                   class="layui-input" value="${student.studentName}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
            <input type="radio" name="gender" value="0" title="男" checked>
            <input type="radio" name="gender" value="1" title="女">
            <input type="radio" name="gender" value="2" title="保密">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">生日</label>
            <div class="layui-input-inline">
                <input type="text" name="dateOfBirth" class="layui-input" id="ID-laydate-dateOfBirth"
                       placeholder="yyyy-MM-dd" required="required" value=<fmt:formatDate value="${student.dateOfBirth}"
                                                                                          pattern="yyyy-MM-dd"/>>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">班级</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="classId" class="layui-input" required="required" value="${student.classId}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">宿舍</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="hostelId" class="layui-input" required="required" value="${student.hostelId}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">手机</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="phone" class="layui-input" value="${student.phone}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="email" class="layui-input" value="${student.email}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">住址</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="homeAddress" class="layui-input" value="${student.homeAddress}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">紧急联系人</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="emergencyContact" class="layui-input" value="${student.emergencyContact}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">紧急联系人电话</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="emergencyContactPhone" class="layui-input"
                       value="${student.emergencyContactPhone}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">专业</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="major" class="layui-input" value="${student.major}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="0" title="在读" checked>
            <input type="radio" name="status" value="1" title="毕业">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="remark" class="layui-input" value="${student.remark}">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit lay-filter="demo1">更新</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script src="/static/layui/layui.js"></script>
<script>
    layui.use(function () {
        var laydate = layui.laydate;
        // 渲染
        laydate.render({
            elem: '#ID-laydate-dateOfBirth'
        });
    });
</script>
</body>
</html>

